package com.aifast.system.log.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 登录日志
 * </p>
 *
 * @author fujian
 * @since 2022-01-07
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("log_login")
public class LogLogin {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    private Integer userId;

    private String type;

    /**
     * 系统名称
     */
    private String osName;

    /**
     * 操作设备
     */
    private String device;

    /**
     * 浏览器类型
     */
    private String browserType;

    private String browserVersion;

    private String ip;
    /**
     * ip地址
     */
    private String ipAddress;

    /**
     * 用户账号
     */
    private String username;

    /**
     * 用户昵称
     */
    private String realName;


    /**
     * 登陆时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;


}
